import request from '@/utils/request'


// 统计信息
export function formStatistic() {
  return request({
    url: '/form/statistic',
    method: 'get'
  })
}

// 查询参数列表
export function listApplyForm(query) {
  return request({
    url: '/form/pageQueryApplyUser',
    method: 'get',
    params: query
  })
}

// 删除申请用户数据
export function delApplyForm(configId) {
  return request({
    url: '/form/userForm/remove/' + configId,
    method: 'get'
  })
}

// 查询申请用户数据详细
export function getApplyFormDetail(configId) {
  return request({
    url: '/form/userForm/detail/' + configId,
    method: 'get'
  })
}





//表单合同模块
// 查询参数列表
export function pageQueryApplyFormLite(query) {
  return request({
    url: '/form/pageQueryApplyFormLite',
    method: 'get',
    params: query
  })
}

// 根据申请单id查询申请单概览信息
export function viewApplyForm(configId) {
  return request({
    url: '/form/viewApplyForm/' + configId,
    method: 'get'
  })
}

// 根据申请单id查询申请单概览信息
export function viewContractPdf(configId) {
  return request({
    url: '/form/viewContractPdf/' + configId,
    method: 'get'
  })
}

// 删除申请单
export function deleteApplyFrom(configId) {
  return request({
    url: '/form/delete/' + configId,
    method: 'post'
  })
}

// 导出表单excel
export function exportExcel(query) {
  return request({
    url: '/form/exportExcel',
    method: 'get',
    params: query
  })
}




// 2023/3/6为主 by xiongx

//合同管理信息
//查询列表信息
export function contractList(query) {
  return request({
    url: '/form/pageQueryApplyFormLite',
    method: 'get',
    params: query
  })
}

// 导出报表参数
export function exportConfig(query) {
  return request({
    url: '/form/exportExcel',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

// 删除信息
export function deleteContract(configId) {
  return request({
    url: '/form/delete/' + configId,
    method: 'get'
  })
}

// 根据申请单id查询报表信息
export function formViewApplyForm(configId) {
  return request({
    url: '/form/viewApplyForm/' + configId,
    method: 'get'
  })
}


// 根据申请单id查询合同信息
export function formGetApplyFormContractDetailById(configId) {
  return request({
    url: '/form/getApplyFormContractDetailById/' + configId,
    method: 'get'
  })
}
// 编辑
export function formUpdate(data) {
  return request({
    url: '/form/update',
    method: 'post',
    data: data
  })
}


//显示条形码
export function formShowBarCode(query) {
  return request({
    url: '/form/showBarCode',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

// 查看合同pdf文件
export function formViewContractPdf(configId) {
  return request({
    url: '/form/viewContractPdf/' + configId,
    method: 'get',
    responseType: 'blob'
  })
}

